package HospitalSystem.src;

import java.util.ArrayList;

public class Appointment {
    static ArrayList<Doctor> doctors = new ArrayList<>();

    private   Appointment() {}

    public static void showDoctors() {
        if (doctors.size() > 0 ) {
            for (Doctor doctor : doctors) {
                System.out.println( doctor.getName() + "，ID" + doctor.getDoctorId());
            }
        }else{
            System.out.println("No doctors found");
        }
    }
    public static void addDoctor(Doctor doctor) {
        if(!doctors.contains(doctor)) {
            doctors.add(doctor);
        }else{
            System.out.println("Doctor already exists");
        }
    }

}
